#ifndef _XBAR_H_
#define _XBAR_H_

typedef uint32_t (*xbar_read)(uint32_t addr);
typedef uint32_t (*xbar_write)(uint32_t addr, uint8_t be, uint32_t val);


typedef struct {
    uint32_t start_addr;
    uint32_t size;
    xbar_read read;
    xbar_write write;
} xbar_slave_intf_t;

int xbar_slave_register(xbar_slave_intf_t *slave);
uint32_t xbar_master_read(uint32_t addr);
uint32_t xbar_master_write(uint32_t addr, uint8_t be, uint32_t val);

#endif
